<?php
header('Content-Type:text/html;charset=utf-8 ');
require_once __DIR__ . '/vendor/' . '/autoload.php';

/**
 * 回调
 */
function notify()
{
    $post = $_POST;
    file_put_contents("aaa.txt",var_export($post,true),FILE_APPEND);
    $propFile = __DIR__ . '/src/security.ini';
    $PayContentBuilder = new \ChinaPay\Payment\PayContentBuilder();
    $PayContentBuilder->setSecurityPropFile($propFile);
    $result = $PayContentBuilder->paymentVerify($post);
    if ($result) {
        // 验签成功
    }
}
notify();